{% extends "base.html" %} {%block css%}
<link rel="stylesheet" href="/editor/css/markdown.css">
<link rel="stylesheet" href="/css/article.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.5.0/build/styles/default.min.css"> {%endblock%} {%block body%}

<div class="body">
    <div class="container">
        <div class="tutorials" id="menuBox" onclick="switchMenu()">
            <div class="title">{{type.name}}</div>
            <ul>
                {% for t in tutorials %}
                <li><a href="/tutorial/{{t.node.id}}.html" {%if t.node.id==tutorial.id%}class="selected" {%endif%}>{{t.node.title}}</a> </li>
                <li class="sub">
                    <ul>
                        {% for t1 in t.children %}
                        <li>
                            <a href="/tutorial/{{t1.node.id}}.html" {%if t1.node.id==tutorial.id%}class="selected" {%endif%}>{{t1.node.title}}</a>
                        </li>
                        {% endfor %}
                    </ul>
                </li>
                {% endfor %}
            </ul>
        </div>
        <div class="content">
            <div class="markdown-body">
                {{tutorial.content|safe}}
            </div>
            <div class="switch-tutorial">
                <a id="prev_tutorial" href="">上一篇</a>
                <a id="next_tutorial" href="">下一篇</a>
            </div>
        </div>
    </div>
    <div class="menuBtn show" id="menuBtn" onclick="switchMenu()">目录</div>
</div>
{%endblock%} {%block js%}
<script src="/js/article.js"></script>
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.5.0/build/highlight.min.js"></script>
<script>
    hljs.initHighlightingOnLoad();
</script>
{%endblock%}